﻿#ifndef CAMERAWORKER_H
#define CAMERAWORKER_H
#include <QObject>
#include <QImage>
#include <QThread>
#include <QTimer>
#include <opencv2/opencv.hpp>
#include "TucamApi.h"
#include <QCoreApplication>
class CameraWorker : public QObject
{
    Q_OBJECT
public:
    explicit CameraWorker(QObject *parent = nullptr);

    void setCameraHandle(TUCAM_OPEN cameraHandle, TUCAM_FRAME frame);   //传入相机参数

signals:


  void frameReady(TUCAM_FRAME& frame);//捕获图像数据传回主线程显示
 public slots:

    void processCameraFrames();             //捕获相机数据

    void stop();

    void ThreadStart();


private:

    TUCAM_OPEN m_opCam;
    TUCAM_FRAME m_frame;
    bool m_running = false;             //线程开始停止标志

};

#endif // CAMERAWORKER_H
